from rest_framework import serializers

from apps.headline.models import Comment
from apps.headline.serializers.user import UserModelSerializer


class SubComment(serializers.ModelSerializer):
    user = UserModelSerializer()

    class Meta:
        model = Comment
        fields = '__all__'


class CommentModelSerializer(serializers.ModelSerializer):
    user = UserModelSerializer()
    # sub = SubComment(many=True)

    class Meta:
        model = Comment
        fields = '__all__'

    # def get_sub(self, obj):
    #     return obj.parent


